FRead

Syntax: @FRead filenum, EOFstatus, variable[, variable]

The FRead command reads information from the file numbered filenum into the variables listed. The end of file status will be returned into the numeric variable named as EOFstatus, as 0 = end of file false and 1 = end of file true. The fields listed as variable, variable, variable, etc., can be separated by commas or tabs in the file.

When only ONE string variable is given, the FRead command will read data up to the end of record (E.O.R. = CR/LF i.e. a line break). The developer can then extract variables from known partitions in the data record string, using Copy commands.

You must use first use @Fopen to open the file and then use @FClose to close it after your read operations have been completed.

Examples

@FRead FileNumber, FileStat, StrData

read the next data record (line) into the string StrData from the file number in FileNum. FileStat will return the end of file status value.

@FRead FileNumber, FileStat, Num[1], Str[2,4], NewDate

read the next three data items into the arrays/variable names shown, which must be of the type suitable to accept the data - numeric, string or date, etc. FileStat will return the end of file status value.